# -*- coding: utf-8 -*-
"""
@date: 2020/12/18 20:49
@file: view_stu.py
@author: lilong
@desc: view使用
"""

import torch
import torch.nn as nn


# view先平铺再变形
a = torch.Tensor([[[1, 2, 3], [4, 5, 6]]])
b = torch.Tensor([1, 2, 3, 4, 5, 6])
m = a.view(1, 6)
n = b.view(2, -1)
print(m.shape)
print(n.shape)